package lexer

// 关键字映射表
var keywordMap = map[string]*Token{
	"SELECT":    TOKEN_SELECT,
	"FROM":      TOKEN_FROM,
	"WHERE":     TOKEN_WHERE,
	"CREATE":    TOKEN_CREATE,
	"TABLE":     TOKEN_TABLE,
	"INSERT":    TOKEN_INSERT,
	"INTO":      TOKEN_INTO,
	"VALUES":    TOKEN_VALUES,
	"UPDATE":    TOKEN_UPDATE,
	"SET":       TOKEN_SET,
	"DELETE":    TOKEN_DELETE,
	"DROP":      TOKEN_DROP,
	"PRIMARY":   TOKEN_PRIMARY,
	"KEY":       TOKEN_KEY,
	"LIKE":      TOKEN_LIKE,
	"BETWEEN":   TOKEN_BETWEEN,
	"AND":       TOKEN_AND,
	"DEFAULT":   TOKEN_DEFAULT,
	"GROUP":     TOKEN_GROUP,
	"BY":        TOKEN_BY,
	"ORDER":     TOKEN_ORDER,
	"ASC":       TOKEN_ASC,
	"DESC":      TOKEN_DESC,
	"DATABASE":  TOKEN_DATABASE,
	"DATABASES": TOKEN_DATABASES,
	"SHOW":      TOKEN_SHOW,
	"USE":       TOKEN_USE,
	"TABLES":    TOKEN_TABLES,
	"INNER":     TOKEN_INNER,
	"LEFT":      TOKEN_LEFT,
	"RIGHT":     TOKEN_RIGHT,
	"JOIN":      TOKEN_JOIN,
	"ON":        TOKEN_ON,
}

// 操作符映射表
var operatorMap = map[string]*Token{
	"=":  TOKEN_EQ,
	">":  TOKEN_GT,
	"<":  TOKEN_LT,
	">=": TOKEN_GTE,
	"<=": TOKEN_LTE,
	"!=": TOKEN_NEQ,
}

// 工具符映射表
var toolSymMap = map[rune]*Token{
	',': TOKEN_COMMA,
	';': TOKEN_SEMI,
	'(': TOKEN_LPAREN,
	')': TOKEN_RPAREN,
	'*': TOKEN_ASTERISK,
}
